import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const LIST: AppRouteRecordRaw = {
  path: '/product',
  name: 'product',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: 'menu.product',
    requiresAuth: true,
    icon: 'icon-robot',
    order: 1,
  },
  children: [

    {
      path: 'product-spu', // The midline path complies with SEO specifications
      name: 'Spu',
      component: () => import('@/views/product/spu/index.vue'),
      meta: {
        locale: 'menu.product.spu.list',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: 'product-category',
      name: 'Category',
      component: () => import('@/views/product/category/index.vue'),
      meta: {
        locale: 'menu.product.category.list',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
        path: 'product-attribute',
        name: 'Attribute',
        component: () => import('@/views/product/attribute/index.vue'),
        meta: {
          locale: 'menu.product.attribute.list',
          requiresAuth: true,
          roles: ['*'],
        },
      },

      {
        path: 'product-sku', // The midline path complies with SEO specifications
        name: 'Sku',
        component: () => import('@/views/product/sku/index.vue'),
        meta: {
          locale: 'menu.product.sku.list',
          requiresAuth: true,
          roles: ['*'],
          hideInMenu: true,
        },
      },
      {
        path: 'product-attribute-value', // The midline path complies with SEO specifications
        name: 'AttributeValue',
        component: () => import('@/views/product/attribute/value.vue'),
        meta: {
          locale: 'menu.product.attributeValue.list',
          requiresAuth: true,
          roles: ['*'],
          hideInMenu: true,
        },
      },
  ],
};

export default LIST;
